package com.bobamrz.dao;

// Generated 01.06.2013 15:31:43 by Hibernate Tools 4.0.0

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Query;
import org.hibernate.Session;

import com.bobamrz.domain.DocAttributeType;
import com.bobamrz.hibernate.HibernateUtil;

/**
 * Home object for domain model class DocAttributeType.
 * @see dao.DocAttributeType
 * @author Hibernate Tools
 */
@Stateless
public class DocAttributeTypeHome {

	
	/* for validation */
	private Session session = HibernateUtil.getSessionFactory().getCurrentSession();
	public List<DocAttributeType> findIdByName(String name) {
		String hql = "FROM DocAttributeType WHERE typeName='" + name + "'";
		Query query = session.createQuery(hql);
		return query.list();
	}
}
